package com.lepu.app.fun.index.bean;

import java.util.ArrayList;

import org.json.JSONException;
import org.json.JSONObject;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.lepu.app.fun.my.bean.BeanMyArticle;
import com.lepu.app.fun.my.bean.BeanQuestionAnswer;
import com.lepu.app.main.bean.BeanFocus;

public class BeanIndex{
	public String HasSignIn;//0-未签到		1-已签到	用户未登录将返回0
   public ArrayList<BeanFocus> BannerList;
   public ArrayList<BeanQuestionAnswer> QuestionAnswerList;
   public ArrayList<BeanMyArticle> GoodArticleList;
   public ArrayList<BeanFocus> ShopBannerList;
   
   public static BeanIndex parseJsonData(String dataString) {
		String result = "";
		try {
			JSONObject jsonObject = new JSONObject(dataString);
			JSONObject obj1 = (JSONObject) jsonObject.get("Result");
			JSONObject obj2 = obj1.getJSONObject("DetailInfo");
			
			result = obj2.toString();
		} catch (JSONException e) {
			e.printStackTrace();
		}

		Gson gson = new Gson();
		BeanIndex item = gson.fromJson(result,new TypeToken<BeanIndex>() {}.getType());
		return item;
	}
}
